package practice06;

public class Teacher extends Person{
    private int Klass;
    private String name;
    private int age;

    public Teacher(String name, int age) {
        super(name, age);
    }
    public Teacher(String name, int age,int klass) {
        super(name, age);
        Klass=klass;
    }
    public String introduce(){
        if (Klass==0){
            return super.introduce()+" I am a Teacher. I teach No Class.";
        }else {
            return super.introduce()+" I am a Teacher. I teach Class "+Klass+".";
        }

    }

    public int getKlass() {
        return Klass;
    }

    public void setKlass(int klass) {
        Klass = klass;
    }

    @Override
    public String getName() {
        return super.getName();
    }

    @Override
    public void setName(String name) {
        this.name = name;
    }

    @Override
    public int getAge() {
        return super.getAge();
    }

    @Override
    public void setAge(int age) {
        this.age = age;
    }
}
